package com.kunyi.web.service.log.application.api;

import com.kunyi.platform.log.client.LogClient;
import com.kunyi.platform.log.entity.dto.SaveOpsDto;
import com.kunyi.platform.log.entity.dto.SaveSafeDto;
import com.kunyi.platform.tool.api.JsonResult;
import com.kunyi.web.service.log.service.ILogOpsService;
import com.kunyi.web.service.log.service.ILogSafeService;
import com.kunyi.web.service.log.service.ILogSysService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName LogClientImpl
 * @Description log client
 * @Author pengjunjun
 * @Date 2024/3/9 15:12
 * @Version 1.0
 **/
@RestController
public class LogClientImpl implements LogClient {
    @Autowired
    private ILogOpsService logOpsService;
    @Autowired
    private ILogSysService logSysService;
    @Autowired
    private ILogSafeService logSafeService;

    @Override
    public JsonResult<Long> feignSaveOps(SaveOpsDto saveOps) {
        return JsonResult.success(logOpsService.save(saveOps));
    }

    @Override
    public JsonResult<Long> feignSaveSafe(SaveSafeDto saveSafe) {
        return JsonResult.success(logSafeService.save(saveSafe));
    }
}
